package com.hq.ims.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.hq.mybatis.base.BaseModel;
import com.hq.web.penum.EnumDeviceType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * jiang bai ping
 *
 * @Email 526666031@qq.com
 * @Detail 用户操作登陆
 */
@Data
@Alias("LogUserOperation")
@TableName(value = "log_user_operation")
@ApiModel(value = "用户操作登陆")
public class LogUserOperation extends BaseModel<LogUserOperation> implements Serializable {

    @ApiModelProperty(value = "ID")
    @TableId(value = "`log_user_operation_id`", type = IdType.ASSIGN_UUID)
    private String logUserOperationId;

    @ApiModelProperty(value = "创建时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "`create_date_time`", fill = FieldFill.INSERT)
    private LocalDateTime createDateTime;

    @ApiModelProperty(value = "用户ID")
    @TableField(value = "`user_id`")
    private String userId;

    @ApiModelProperty(value = "操作详情")
    @TableField(value = "`operation_detail`")
    private String operationDetail;

    @ApiModelProperty(value = "操作url")
    @TableField(value = "`url`")
    private String url;

    @ApiModelProperty(value = "操作的参数")
    @TableField(value = "`param`")
    private String param;

    @ApiModelProperty(value = "登陆设备")
    private EnumDeviceType loginEquipment;

    @ApiModelProperty(value = "登陆IP")
    @TableField(value = "`operation_ip`")
    private String operationIp;

    @ApiModelProperty(value = "")
    @TableField(value = "`version`")
    private Integer version;

    @ApiModelProperty(value = "用户登录账号")
    @TableField(value = "`user_account`")
    private String userAccount;

    @ApiModelProperty(value = "是否删除")
    @TableField(value = "`is_del`")
    private Boolean isDel;
}
